package com.kk.memento;

import java.util.ArrayList;
import java.util.List;

/**
 * @author o_o
 * @date 2022-06-19
 */
public class CareTaker {

    private final List<Memento> mementoList = new ArrayList<>();

    public void add(Memento memento) {
        mementoList.add(memento);
    }

    public Memento getMementoByIndex(int index) {
        return mementoList.get(index);
    }
}
